package com.xjh.controller;

import com.xjh.po.AclUserPO;
import com.xjh.po.xjhTable;
import com.xjh.service.TestDynamicSqlService;
import com.xjh.utils.resultutils.ResponseObj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author XuJianHua
 * @date 2022-09-13 15:44:28
 * @description
 */
@RestController
@RequestMapping("/api/DynamicSql")
public class TestDynamicSqlController {
    //private final TestDynamicSqlService testDynamicSqlService;
    //
    //public TestDynamicSqlController(TestDynamicSqlService testDynamicSqlService) {
    //    this.testDynamicSqlService = testDynamicSqlService;
    //}

    @Autowired
    TestDynamicSqlService testDynamicSqlService;

    @GetMapping("/test")
    public ResponseObj get() {
        List<xjhTable> test = testDynamicSqlService.test();
        ResponseObj responseObj = new ResponseObj();
        return responseObj.ok(test);
    }

    @GetMapping("/test1")
    public String get11() {
       String s = testDynamicSqlService.hashCode()+"" ;
        ResponseObj responseObj = new ResponseObj();
        return s;
    }
}

